<template>
  <div>
    <ActionList :list="data" :totol="totol" :currentPage="currentPage" />
  </div>
</template>

<script>
import ActionList from "../../components/ActionList/inedx";

export default {
  layout: "default",
  components: {
    ActionList,
  },
  async asyncData({ $axios, route, params, app }) {
    let type = params.index == "生活" ? "life" : params.index;
    let page = params.id;
    console.log({type,page})
    let { data } = await $axios({
      url: `http://localhost:3002/typelist?page=${page}&type=${type}`,
      method: "post",
    });
    console.log({data})
    return {
      data: data.data,
      totol: data.totol,
      currentPage: Number(page),
    };
  },
};
</script>

<style>
</style>